<?php
  include_once(dirname(__FILE__)."/../database/database.class.php");

  class Expansion
  {
    protected $id;

    public function Expansion($id)
    {
      $this->id = $id;
    }

    public function getID()
    {
      return $this->id;
    }
    
    public function getName()
    {
      global $db;
    
      return $db->getExpansion($this->id)->name;
    }
    
    public function getCards($order, $limit)
    {
      global $db;

      $return_cards = array();

      $cards = $db->getCardsInExpansion($this->id, $order, $limit); 

      foreach($cards as $card)
      {
        array_push($return_cards, new Card($card->ID));
      }

      return $return_cards;
    }

  }

?>
